package sanshui.system.trade.factory.data;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import sanshui.system.trade.pojo.GetStockInfoParam;
import sanshui.system.trade.pojo.StockInfoVo;

import java.util.List;

@Service
@Slf4j
public class DataMarketRunImpl implements DataMarketRun {

    @Override
    public StockInfoVo getStockInfo(TradeMarketKey tradeMarketKey) throws Exception {
        if (TradeMarketKey.A_GU.compareTo(tradeMarketKey) == 0){
            return this.getStockInfoFromAgu();
        }
        throw new Exception("没有对应的市场数据");
    }

    @Override
    public List<StockInfoVo> getStockInfoHis(TradeMarketKey tradeMarketKey, GetStockInfoParam getStockInfoParam) throws Exception {
        if (null != getStockInfoParam && TradeMarketKey.A_GU.compareTo(tradeMarketKey) == 0){
            return this.getStockInfoFromAguHis(getStockInfoParam);
        }

        throw new Exception("没有对应的市场数据");
    }

    private StockInfoVo getStockInfoFromAgu(){
        return null;
    }

    private List<StockInfoVo> getStockInfoFromAguHis(GetStockInfoParam getStockInfoParam){
        return null;
    }
}
